extends public/pretty_layout
block content
    .container(style='min-height:600px')
        if(!page.data || page.data.length==0)
            div.text-center 没有搜索结果~
        else
            mixin item(goods)
                div.wrapper
                    - var url = goods.type==1?"/recipe/details/":"/menu/detail/"
                    a(href="#{url+goods.id}" target="_blank")
                        img(src="#{goods.finishedProductImage || goods.image || '/images/menu_default.jpg'}", alt="goods.title")
                    p.title!=goods.type==1?"[菜谱]"+goods.highlightTitle:"[菜单]"+goods.highlightTitle
                    div.bottom-panel
                        span.left #{dateformat(goods.createOn)}
            mixin panel(index)
                if(index < page.data.length)
                    if(index % 4 === 0)
                        div.item-panel
                            + item(page.data[index])
                        + panel(index + 4)
                    else
                        div.item-panel(style="margin-left:8px")
                            + item(page.data[index])
                        + panel(index + 4)

            - var quality = page.data.length > 4 ? 4 : page.data.length
            - for(var i=0; i<quality; i++){
                div(style='display:block;float:left;width:274px')
                    + panel(i)
            - }
        div.clearfix
        //pagination
        div.text-center
            include public/page_nav
